import  numpy as np

# arr=np.array([[1,2,3,5],[4,5,6,7],[7,8,9,9]])
# print(arr)
# print(arr.shape)#打印输出数组形状
# print(arr.T)#矩阵转置（行列转换）
# arr1=np.array([1,2,3])
# print(arr1)
# arr2=np.array([4,5,6])
# print(arr2)
# print('-'*40)
# print(arr1+arr2)
# print('-'*40)
# print(arr1-arr2)
# print('-'*40)
# print(arr1*arr2)
# print('-'*40)
# print(arr1/arr2)

# arr1=np.array([[1,2],[3,4]])
# print(arr1)
# arr2=np.array([[5,6],[7,8]])
# print(arr2)
# print('-'*40)
# print(arr1*arr2)
# print('-'*40)
# print(arr1+arr2)
# print('-'*40)
# print(arr1/arr2)
# arr=np.array([1,2,3,4,5,6])
# print(arr[1:3])

arr = np.array([[1, 2, 3], [4, 5, 6]])

print(arr)

# print(arr.shape)
# print(arr.T)
# print(arr.reshape(3,2))#reshape 修改数组形状
# print(arr.reshape(6,1))
# print(arr.flatten()) #二维数组转一维数组（降维）

#print(np.random.rand(3,3))#随机生产3*3数组
print(np.random.randint(2,10))#随机生成一个整数